package com.example.app;

import android.app.Activity;
import android.webkit.JavascriptInterface;

public class JsInteration {
    private Activity mActivity;

    public JsInteration(Activity webviewActity) {
        this.mActivity = webviewActity;

    }

    @JavascriptInterface
    public String closeActivity() {
        if (mActivity == null) return "closeActivity failed";
        mActivity.finish();
        mActivity.overridePendingTransition(0, R.anim.bottom_out);
        return "closeActivity done";
    }
}
